package ck.tool.stocksmart;

import java.text.SimpleDateFormat;
import java.util.Date;

public class StockFormat {

  String stock;
  Date created;
  float current_price;
  float first_focus_price;
  float rise_price;
  float drop_price; 
  
  public String getStock() {
    return stock;
  }
  
  public Date getCreated() {
    return created;    
  }
  
  public float getCurrentPrice() {
    return current_price;
  }

  public float getFirstFocusPrice() {
    return first_focus_price;
  }
  
  public float getRisePrice() {
    return rise_price;
  }
  
  public float getDropPrice() {
    return drop_price;
  }
  
  public StockFormat(String _stock) {
    this(_stock, new Date(java.lang.System.currentTimeMillis()),0,0,0,0);
  }
  
  public StockFormat(String _stock, Date _created, float _current_price, float _first_focus_price, float _rise_price, float _drop_price) {
    stock = _stock;
    created = _created;
    current_price = _current_price;
    first_focus_price = _first_focus_price;
    rise_price = _rise_price;
    drop_price = _drop_price;
  }

  @Override
  public String toString() {
    SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy");
    String dateString = sdf.format(created);  
    return "(" + dateString +  ") " + stock; 
  }
}